﻿using System.Collections.Generic;
using Idea.Entity.Collections.Interface;
using Idea.Query.Interface;

namespace Idea.Repository.Collections.Interface
{
    public interface ICollectionQueryExecuter
    {
        long Count<TCollection>(IQueryObject<TCollection> query)
            where TCollection : class, ICollectionEntity;

        IEnumerable<TCollection> Fetch<TCollection>(IQueryObject<TCollection> query)
            where TCollection : class, ICollectionEntity;

        TCollection FetchOne<TCollection>(IQueryObject<TCollection> query)
            where TCollection : class, ICollectionEntity;
    }
}
